package com.juangomez.math;

public class Operaciones {
	

	public int sumar(int n1, int n2) {

		return n1 + n2;

	}

	public int restar(int n1, int n2) {

		return n1 - n2;

	}

	public int multiplicar(int n1, int n2) {

		return n1 * n2;

	}

	public int dividir(int n1, int n2) {

		return n1 / n2;

	}

	public static void main(String args[]) {

	}

}

class OperacionesTest {

	public static void main(String args[]) {

		Operaciones operaciones = new Operaciones();

		System.out.println("El resultado de la suma de 5 + 5 es: "
				+ operaciones.sumar(5, 5));

		for (int i = 0; i < 10; i++) {

			int n1 = (int) (Math.random() * 50);
			int n2 = (int) (Math.random() * 50);
			System.out.println(n1 + "+" + n2 + "=" + operaciones.sumar(n1, n2));
			System.out.println(n1 + "x" + n2 + "="
					+ operaciones.multiplicar(n1, n2));
			System.out
					.println(n1 + "-" + n2 + "=" + operaciones.restar(n1, n2));
			System.out.println(n1 + "/" + n2 + "="
					+ operaciones.dividir(n1, n2));

		}

	}

}
